<%@page import="javafx.scene.control.Alert"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	
</script>
</head>
<body>
	<%
		String name = request.getParameter("txtUsername");
		String pwd = request.getParameter("txtPassword");
		String rand = (String) session.getAttribute("rand");
		String input = request.getParameter("Vilidate");
		if (rand.equals(input)) {
			if (name.equals("admin") && pwd.equals("123456")) {

				response.sendRedirect("loginInfo.jsp");
				session.setAttribute("name", name);
				session.setAttribute("pwd", pwd); 
			} else {
	%>
	<font>用户名或密码错误！</font>
	<%
		}

		} else {
	%>
	<font>验证码错误！</font>
	<%
		//response.sendRedirect("Login.jsp");

		}

		//response.sendRedirect("Login.jsp");
	%>

</body>
</html>